package day07;

import java.util.Scanner;

public class PrimeNumber {
    public static void main(String[] args) {
        for (int num = 2; num <= 100; num++) {
            boolean flag = true;
            for (int i = 2; i <= num / 2; i++) {
                if (num % i == 0) {
                    flag = false;
                    break;
                }
            }
            if (flag) {
                System.out.print(num + "\t");
            }
        }

       /* for (int num = 2; num <= 100; num++) {
            boolean flag = true;
            for (int i = 2; i <= num / 2; i++) {
                if (num % i == 0) {
                    flag = false;
                    break;
                }
            }
            if (flag) {
                System.out.print(num + "\t");
            }
        }*/

       /* for (int num = 2; num <= 100; num++) {
            boolean flag = true;
            for (int i = 2; i <= num / 2; i++) {
                if (num % i == 0) {
                    flag = false;
                    break;
                }
            }
            if (flag) {
                System.out.print(num + "\t");
            }
        }*/
































    /*  int num=31;
      boolean flag=true;
      for (int  i=2;i<=num/2;i++){
          if (num%i==0){
              flag = false;
              break;
          }
      }
      if(flag){
          System.out.println(num+"是质数");
      }else{
          System.out.println(num+"是质数");
      }*/
    }
}
